package controllers

import (
	"github.com/astaxie/beego"
)

type TaskController struct {
	beego.Controller
}

// Get /api/project/:id/tasks [GET]
func (c *TaskController) Get() {
	// projectId, _ := strconv.ParseInt(c.Ctx.Input.Param(":id"), 10, 64)
	// status, _ := c.GetInt("status")
	// username := c.GetString("username")
	// rights, err := models.QueryUserRightByUsername(username)
	// if err != nil {
	// 	c.Data["json"] = NewResponseFor("user.query.fail")
	// 	c.ServeJSON()
	// 	return
	// }
	// responseRights := make([]ResponseUserRight, 0)
	// for _, right := range rights {
	// 	responseRight := ResponseUserRight{}
	// 	responseRight.Username = right.Username
	// 	responseRight.Project = right.Name
	// 	switch right.Role {
	// 	case 1:
	// 		responseRight.Role = "管理员"
	// 	case 2:
	// 		responseRight.Role = "审核用户"
	// 	default:
	// 		responseRight.Role = "普通用户"
	// 	}
	// 	responseRights = append(responseRights, responseRight)
	// }
	// rsp := NewResponse()
	// rsp.Data = responseRights
	// c.Data["json"] = rsp
	// c.ServeJSON()
}
